package org.NooLab.texx.plugg.algo.intf;

import java.io.Serializable;
import java.util.ArrayList;



public interface AlgorithmIntf extends AlgorithmParameterIntf, Serializable{
	
	// 0= passive, 1=value transform, 2=column writer, determines the interface and thus the handling of data 
	
	public static final int _ALGOTYPE_GENERIC    = 0 ; 

	// 2,3,4 = for tables
	public static final int _ALGOTYPE_PASSIVE    = 2 ; 
	public static final int _ALGOTYPE_VALUE      = 3 ; 
	public static final int _ALGOTYPE_WRITER     = 4 ;
	
	// 7 = representing the input data as a table of assignates including their values
	//     such a table contains just 1 row of values and a header
	public static final int _ALGOTYPE_ASSIGNATOR = 7;
	
	// for basic reading and translating/extracting into plain data, e.g. text, png
	public static final int _ALGOTYPE_READER     = 10 ; 
	public static final int _ALGOTYPE_VISOR      = 11 ;
	// also for video, series of images .... 
	public static final int _ALGOTYPE_LISTENER   = 15 ; 

	/** range violation will lead to an Exception  */
	public static final int _ALGO_RANGEVIOLATION_EXCEPTION   = 1;
	
	/** range violation will lead to missing value  */
	public static final int _ALGO_RANGEVIOLATION_DROPVALUE   = 3;
	
	/** simple changes values such that they fit into [0..1] (except for missing value)  */
	public static final int _ALGO_RANGEVIOLATION_AUTOCORRECT = 4;

	

	

	
	public int getType();
	
	public String getVersion();
	
	public String getInstanceGuid();

	
	/**
	 * starts the calculation = digesting of the input data
	 * returns 0 if ok, <0 if a problem occurred 
	 */
	public int calculate() throws Exception ;
	

	public ArrayList<Double> getDescriptiveResults() ;
	
	
	public String[] showAvailableParameters();
	
	
	public AlgorithmParameters getParameters() ;
	
	public void setParameters( AlgorithmParameters algorithmParams ) throws Exception ;
	public void setParameters( ArrayList<Object> params ) throws Exception ;
		
	
	public int getRangeViolationCounter() ;

	public void setRangeViolationCounter(int rangeViolationCounter) ;

	
	
	
}
